



<!DOCTYPE html>
<html>
 <head>
  <title> ztree demo </title>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="${cxt!}/assert/plugin/zTree_v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
  <style>
	body {
	background-color: white;
	margin:0; padding:0;
	text-align: center;
	}
	div, p, table, th, td {
		list-style:none;
		margin:0; padding:0;
		color:#333; font-size:12px;
		font-family:dotum, Verdana, Arial, Helvetica, AppleGothic, sans-serif;
	}
	#testIframe {margin-left: 10px;}
  </style>
	<script type="text/javascript" src="${cxt!}/assert/plugin/zTree_v3/js/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="${cxt!}/assert/plugin/zTree_v3/js/jquery.ztree.core-3.5.js"></script>
	<script type="text/javascript" src="${cxt!}/assert/plugin/zTree_v3/js/jquery.ztree.exhide-3.5.js"></script>
	<script type="text/javascript" src="${cxt!}/web/module/admdiv/jquery.ztree.search.js"></script>
  	<script type="text/javascript" >
  var setting = {
		  async: {
			  enable: true, 
			  dataType:"json",
			  type: "get",
			  url: "/admdiv/listdata"
		  },
		  view: {
			  dblClickExpand: true,
			  selectedMulti: false,
			  expandSpeed: ($.browser.msie && parseInt($.browser.version)<=6)?"":"fast"
		  },
		  data: {
			    simpleData: {
			      enable: true,
			      idKey: "code",
			      pIdKey: "pcode"
			    }
		  },
		  callback: {
		    //onNodeCreated: zTreeOnNodeCreated
		  },
			view: {
				//fontCss: setFontCss
			}
		};
  
	  $(document).ready(function() {
		  var zTreeObj = $.fn.zTree.init($("#dep_tree"), setting);
	   });
			
		</script>
</head>  
 <body>
 	<br/><br/><br/>
	<!--搜索框-->
	<div>
		<input id="query" type="text" placeholder="请输入搜索条件" class="span8" style="font-size:12px"/>
		<button type="button" class="btn btn-info" onclick="search('dep_tree', 'query')">搜索</button>
    </div>
	<!--树-->
    <ul id="dep_tree" class="ztree"></ul>  
 </body>
 </html> 
  